<script setup lang="ts">
/**
 * 元组，固定长度
 */
type ETupleType<
    T,
    N extends number,
    R extends readonly T[] = [],
> = R['length'] extends N ? R : ETupleType<T, N, readonly [T, ...R]>;

const list: ETupleType<string, 3> = ['1', '2', '3'];
</script>

<template>
    {{ list }}
</template>
